<!DOCTYPE html>
<html lang="ko">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>对话框</title>
</head>

<body>
  <main class="container">
    <!-- <div>
      <textarea id="textVal" name="story" rows="5" cols="33" placeholder="请输入"></textarea>
      <br/>
      <button onclick="onSaveText()">保存内容</button>
    </div>
    <br/>
    <div>
      <button onclick="openDialog('open')">选择对话框</button>
      <button onclick="openDialog('save')">保存对话框</button>
      <button onclick="openDialog('message')">消息对话框</button>
    </div> -->
    <div>
      <button onclick="read()">获取剪切板数据</button>
    </div>
  </main>
  <script>
    // const { ipcRenderer } = require('electron')
    // function openDialog(type) {
    //   ipcRenderer.send('open-dialog', type)
    // }
    // function onSaveText() {
    //   const text= textVal.value
    //   if(!text) {
    //     return console.log('请输入内容')
    //   }
    //   ipcRenderer.send('save-text',text)
    // }

    function read() {
      const result = myAPI.read()
      console.log(result)
    }
  </script>
</body>

</html>